home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 042a / 3dlib17f.zip / 3DLIB.DOC < prev    next >
Text File  |  1993-03-15  |  21KB  |  399 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                                 ISoft D&M                                ║
  5.  ║                                 POB. 5517                                ║
  6.  ║                           Coralville IA 52241                            ║
  7.  ║                                   U.S.A                                  ║
  8.  ║                                                                          ║
  9.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  10.  
  11. *******************************************************************************
  12. *                                    3dLIB                                    *
  13. * 3dLIB - 3D Graphic objects library for Turbo-Pascal Programmers. V1.7       *
  14. * Last Update : Mar. 15, 1992.                                                *
  15. *******************************************************************************
  16.  
  17. *******************************************************************************
  18. *                                 FILE - LIST                                 *
  19. *******************************************************************************
  20.  
  21.   The distribution package contains the following files :
  22.  
  23.         *       .PAS      - Pascal sources :
  24.                             CTM3D   .PAS - Current Transformation Matrix definition.
  25.                             PROJECT3.PAS - Projection (3D -> 2D) unit.
  26.                             HDR3D   .PAS - Header to 3D structures.
  27.                             RTOBJ   .PAS - 3D Wire-Mesh objects.
  28.                             DEMO3D  .PAS - A demo program - Dos.
  29.                             DEMO3DW .PAS - A demo program - Windows.
  30.         *       .3D2      - Demo OBJ3D Type object files :
  31.                             3       .3D2 - A 3 dimensional "3" character.
  32.                             BOX     .3D2 - A 3D box.
  33.                             D       .3D2 - A 3 dimensional "d" character.
  34.                             PROP    .3D2 - A 3D Propeller.
  35.                             PYR     .3D2 - A Pyramid.
  36.                             SUPROP  .3D2 - Another 3D Propeller.
  37.                             TRAP    .3D2 - A 3D Trapeze.
  38.         *       .3DS      - Demo ComplexObj type object files.
  39.         *       .3DD      - Demo object definition files.
  40.         3DLIB   .DOC      - This file.
  41.         3DC     .EXE      - M3D to PAS source file translator.
  42.         3DCW    .EXE      - Windows Hosted MDI M3D to PAS generator, and animator.
  43.         3DC     .DOC      - 3dC translator documentation.
  44.         3DA     .EXE      - 3dA Macro Animator (Interpreter) for the Dos environment.
  45.         3DO     .EXE      - 3dO object compiler - Dos.
  46.         3DO     .DOC      - 3dO object compiler documentation.
  47.         *       .M3D      - Sample macro programs.
  48.         DEMO3D  .EXE      - Demo 3d animation program - Dos.
  49.         DEMO3DW .EXE      - Demo 3d animation program - Windows.
  50.         PROGRAMS.TXT      - ISoft D&M shareware products description.
  51.         3DLIB   .REG      - 3dLIB registration file.
  52.         3DLIB   .RES      - 3dLIB resource file for windows programs.
  53.         3DCW    .HLP      - 3dCW online windows help file.
  54.         EGAVGA  .BGI      - BGI driver for EGA/VGA.
  55.  
  56.  
  57. *******************************************************************************
  58. *                                Why Register                                 *
  59. *******************************************************************************
  60.  
  61.   3dLIB is a shareware product, if you find this product valuable, 
  62.  please register it. This section describes the reasons you should register.
  63.  
  64.   By registering you will receive a diskette with the latest 3dLIB version, 
  65.  the 3d environment program, for WYSIWYG object creation, the complete source 
  66.  code for the 3d environment program, and - you will help us to create the next 
  67.  version of 3dLIB - that will include even more features then the features that 
  68.  are currently available!,  we might even add YOUR enhancement requests!
  69.  
  70. *******************************************************************************
  71. *                                   Notice                                    *
  72. *******************************************************************************
  73.  
  74.   Please notice that from V1.7 the 3dWC program needs the BWCC DLL supplied with
  75.  Borland Pascal 7.0 or Turbo Pascal for Windows. (As well as some other 
  76.  packages), The 3dLib package is distributed in several forms - If you
  77.  downloaded your package from a BBS or archive site, this file will NOT be
  78.  included in the distribution package - it is assumed that you have this 
  79.  DLL. (This is done in order to minimize your download expenses).
  80.  
  81. *******************************************************************************
  82. *                                 What's  New                                 *
  83. *******************************************************************************
  84.  
  85.   In version 1.7 the help facility of the 3dCW program can be activated from
  86.  the menu, not just from the toolbar.
  87.  
  88.   From this version the extremly important feature of having the author's
  89.  picture in the background of the 3dCW program is added. In this picture the
  90.  author is seen in his Alfa-Romeo Spider 2000. Admit it - this is a feature 
  91.  no other 3d graphic library (how many are there?) can offer you.
  92.  
  93.   The Options|Text Color option in the 3dCW program now works properly.
  94.  
  95.   The help database was extended, and received usefull titles in this
  96.  version.
  97.  
  98.   The 3dCW program was converted to work with Borland's BWCC DLL.
  99.  
  100.   Added Help|Using help option in the 3dCW program.
  101.  
  102.   The 3dO object compiler now supports the creation of complex objects, as
  103.  well as simple objects. (Added a complexObject statement to the 3DD langauge).
  104.  
  105.   The SimpleObject statement of the 3DD langauge (3dO object compiler..) now has
  106.  a new optional parameter - NOGEN.
  107.  
  108. ====
  109.  
  110.   In version 1.6 3dCW users can set the font of the edit window.
  111.  
  112.   The Dos and Windows source library files are combined, and only the 
  113.  different parts are seperated by {$ifdef}s (conditional compiles).
  114.  
  115.   Added support for BP7, and upgraded the utilities to BP7.
  116.  
  117.   3dCW was converted to be a MDI program, with the goodies of a toolbar, etc.
  118.  
  119.   The 'w' and 'b' are handled as they should be in the 3dCW animator from
  120.  this version. (A bug fix). 
  121.  
  122.   Added the 3dO object compiler program, that helps with the creation of
  123.  3d objects from object definition files described in the new object
  124.  definition language. (please refer to 3DO.DOC).
  125.  
  126. ====
  127.  
  128.   In version 1.5 the 3dC and 3dCW programs generate a getClassName function
  129.  for the generated windows.
  130.  
  131.   Added Animate Command to the 3dCW program, this way macros can be prototyped
  132.  before they are translated into source code.
  133.  
  134. ====
  135.  
  136.   Version 1.4 adds the 3dA program - an animator for .M3D macro programs,
  137.  in the dos Environment. 
  138.  
  139.   Version 1.4 also adds the Windows Hosted 3dCW program - A macro translator
  140.  that runs in the Windows environment.
  141.  
  142.   This version was tested with Turbo Pascal for Windows V1.5 .
  143.  
  144. ====
  145.  
  146.   Version 1.3 adds the 3dLIB.RES resource file for use in Windows programs 
  147.  generated by the 3DC program.
  148.  
  149.   3dC generated programs include a menu that allows them to be re-animated and
  150.  closed.
  151.  
  152. ====
  153.  
  154.   Version 1.2 adds support for Turbo Pascal for Windows programmers by including
  155.  a second set of pascal code sources for this compiler. 
  156.  
  157.   The supplied 3dC macro compiler has been enhanced to produce code for both
  158.  compilers, by using a switch on the command line. Please notice - The
  159.  same macro source files can be translated into Turbo Pascal 6.0 and
  160.  Turbo Pascal for Windows code, with no change in the macro definition!
  161.  
  162.   The supplied 3dC macro compiler implemented the z, b and w commands that
  163.  were omitted from version 1.1 because of time constraints.
  164.  
  165. *******************************************************************************
  166. *                                INTRODUCTION                                 *
  167. *******************************************************************************
  168.  
  169.   3dLIB is a library of pascal units that allows Turbo-Pascal programmers to                                 
  170.  write applications that display and animate 3D wire-mesh objects. The 
  171.  library is based on a project developed since 1984 on different platforms.
  172.  
  173.   This package supports both Turbo-Pascal for DOS and Turbo Pascal for Windows.
  174.  
  175.   A package called 3D120 is distributed by ISoft D&M that 
  176.  includes a graphic editor, macro interpreter and pascal translator to
  177.  create and use 3D objects. It is highly recommended that any programmer
  178.  trying to use this library will use the 3D program to create 
  179.  objects, and understand the animation abilities of the library.
  180.  
  181.   For more help - please consult the provided on-line help database, from
  182.  within the 3dCW program.
  183.  
  184. *******************************************************************************
  185. *                                   OBJECTS                                   *
  186. *******************************************************************************
  187.   The 3D objects are defined as the following TP object-structures :
  188.   
  189. *******************************************************************************
  190. *                                 BaseObject                                  *
  191. *******************************************************************************
  192.  baseObject - defined in the RTOBJ.PAS file, this is the "dummy"
  193.  ancestor object class of the 3D-objects, such an object has a CTM (called
  194.  myCTM), a color, a center of gravity 3D point (location), and other display
  195.  attributes, in order to achieve better animation results, a scrPntUpdt 
  196.  boolean variable is used to indicate if the screen 2D points of the
  197.  object has to be re-calculated from the 3D representation.                       
  198.   
  199.   The object uses a 4X4 "transformation matrix" to represent itself in the
  200.  3D universe, the move, translate, scale, allScale, rotate, goto3dPos,
  201.  setToOrigin, calcLocation and deleteTransform methods are used to update
  202.  that matrix (the Current Transformation Matrix).
  203.  
  204.   The load, save, writeMe, and readMe methods are used to store and retrieve
  205.  a 3D object from a storage device (a disk..), and the open and close methods
  206.  are used to construct, and destruct the object. The show, hide and paint
  207.  methods display, or erase the object on the 2D screen. One more interesting
  208.  method is the updateScreenPoints method, that transforms the 3D object 
  209.  representation to the 2D screen.
  210.  
  211. *******************************************************************************
  212. *                                    obj3D                                    *
  213. *******************************************************************************
  214.   obj3D is a descendant object of the baseObject class, this is a simple
  215.  wire-mesh object, that is built from an array of maxPoints points (change
  216.  this constant in the HDR3D.PAS file to create bigger, or smaller objects)
  217.  in the 3D universe, an array of maxLines lines (a line is a segment in the
  218.  3D universe that connects 2 3D points), another array holds the 2D screen
  219.  points of the object, calculated from its 3D representation, and the CTM.
  220.  Another interesting aspect of this object is the use of 2 more matrices,
  221.  the reverseRot, and unReverseRot CTM objects, that are used to hold only the
  222.  reverse, and counter reverse of the rotation transformations, these are used
  223.  by complex objects that contain several obj3D objects, where some of them 
  224.  has to be rotated, scaled and translated around an arbitrary point in the
  225.  3D universe, which is not there center of gravity (frame - reference).
  226.  
  227.   This object is refered as simple object in some places in the provided 
  228.  documentation.
  229.  
  230. *******************************************************************************
  231. *                                 complexObj                                  *
  232. *******************************************************************************
  233.   The RTOBJ.PAS file contains the definition of the complexObj 3D object,
  234.  this is an object that contains a maxSubObjects (defined in that file)
  235.  array of simple wire-mesh obj3D objects. This object class sometimes
  236.  referred to as the "super - object", allows the user to create complex 3D
  237.  objects that has a common frame - reference (center of gravity), an example
  238.  of such an object might be a Robot, that has a center of gravity, and is
  239.  built of some sub objects that must be able to be transformed both with the
  240.  frame - reference, and by themselves.
  241.  
  242.   The RTOBJ.PAS (for - RunTime object) unit file contains the definition of
  243.  the baseObj, obj3D and the complexObj classes.
  244.  
  245.  
  246. *******************************************************************************
  247. *                                 PROJECTIONS                                 *
  248. *******************************************************************************
  249.  
  250.   The PROJECT3.PAS file contain the code that transforms objects and points
  251.  from the 3D universe, to the 2D coordinates.
  252.  
  253.   Two 3D -> 2D transformations are supported, axonometric projection, and 
  254.  perspective projection. This is a short explanation of the difference
  255.  between these 2 projections :
  256.  
  257.                A : axonometric projections, no perspective due to        
  258.                        distance is performed, the general way            
  259.                        we can look at the coordinate system is as        
  260.                        follows :                                         
  261.                                                                          
  262.                                |  z axis                                 
  263.                                |                                         
  264.                               / \                                        
  265.                     x axis   /   \  y axis                               
  266.                                                                          
  267.                B : perspective projections : the normal eye perspective  
  268.                        projection is performed, we can look at the 3d    
  269.                        universe we are referring to as a cube of          
  270.                        1000 x 1000 x 1000 integer locations, with        
  271.                        the x axis, and y axis parallel to the screen     
  272.                        x, y axis respectively, and the z axis going into  
  273.                        the screen.                                       
  274.                                                                          
  275.                        we will look at the coordinate system as follows :
  276.                                                                          
  277.                        │ Y axis                                          
  278.                        │                                                 
  279.                 Z axis x------ X axis                                    
  280.                                                                          
  281.   These units contain a calcPoint procedure that receives a 3D point, and
  282.  transforms it to a 2D screen coordinate, the setPerspective, 
  283.  resetPerspective and togglePerspective change from perspective projection
  284.  to axonometric projection, and vice versa.
  285.  
  286. *******************************************************************************
  287. *                                     CTM                                     *
  288. *******************************************************************************
  289.  
  290.   CTM3D.PAS is the file that defines the current transformation matrix that                                      
  291.  is used to position the 3D objects in the universe. The CTM is a 4x4 matrix
  292.  that is multiplied (from the right) by each point of the 3D object whenever
  293.  a new location is desired for the object. 
  294.  
  295.   This unit defines all the transformations that can be applied and used
  296.  by a CTM, like rotate, scale, translate etc..
  297.  
  298. *******************************************************************************
  299. *                                 3D2 FORMAT                                  *
  300. *******************************************************************************
  301.  
  302.   The obj3D object files are files of type real, that has the following
  303.  structure :
  304.  
  305.  1 Real entry : number of 3D points. (We will call in numOfPoints)
  306.  numOfPoints entries that contain the following information :
  307.      1 Real Entry : X location in the 3D universe.
  308.      1 Real Entry : Y location in the 3D universe.
  309.      1 Real Entry : Z location in the 3D universe.
  310.  1 Real Entry : number of lines.  (We will call it numOfLines)
  311.  numOfLines entries that contain the following information :
  312.      1 Real Entry : 3D Point Number of "From" edge of the line.
  313.      1 Real Entry : 3D Point Number of "To" edge of the line.
  314.  
  315.  Please refer to the OBJ3D.README method that deals with reading this 
  316.  3D file format.
  317.  
  318.  To Create object of this kind - Please use the 3dO object compiler provided
  319.  with this package, or the 3D environment program available in a different
  320.  package, or with the registered version.
  321.  
  322. *******************************************************************************
  323. *                                 3DS FORMAT                                  *
  324. *******************************************************************************
  325.  
  326.   The complexObj object files are files of real type that have the
  327.  following structure :
  328.  
  329.  1 Real Entry : Number of subobjects the complexObj contain (We will
  330.                  call it numOfChilds)
  331.  numOfChilds entries that have the same structure as simple 3D2 files.
  332.  
  333.  To Create object of this kind - Please use the 3dO object compiler provided
  334.  with this package, or the 3D environment program available in a different
  335.  package, or with the registered version.
  336.  
  337. *******************************************************************************
  338. *                                  Warranty                                   *
  339. *******************************************************************************
  340.  
  341.   There is no warranty what so ever, The package is supplied as is,
  342.  The distributor (ISoft D&M), or the author (Loewy Ron), are not,
  343.  and will not be responsible for any damages, lost profits, 
  344.  or inconveniences caused by the use, or inability to use this package. 
  345.  The use of the package is at your own risk. 
  346.  By using (or attempting to use) the package you agree to this.
  347.  
  348. *******************************************************************************
  349. *                                   General                                   *
  350. *******************************************************************************
  351.  
  352.   3dLIB is distributed by ISoft D&M, P.O.B. 5517 CORALVILLE IA 52241, U.S.A.
  353.   
  354.   3dLIB is (c) copyrighted by Loewy Ron, 1991,93.
  355.  
  356.   3dLIB is a shareware package, please register your copy. 
  357.   To register your copy of 3dLIB please refer to the supplied
  358.   3DLIB.REG file. 
  359.  
  360.   Other programs distributed by ISoft D&M are described in the supplied  
  361.   PROGRAMS.TXT file.
  362.  
  363. *******************************************************************************
  364. *                                   Contact                                   *
  365. *******************************************************************************
  366.  
  367.   Please contact :
  368.  
  369.   ISoft D&M,  
  370.   P.O.B 5517
  371.   Coralville IA 52241,
  372.   U.S.A
  373.  
  374.   To contact the author directly : 
  375.  
  376.   Contact :     Loewy Ron,
  377.                 9 Haneveem st.
  378.                 Herzeliya, 46465
  379.                 ISRAEL.
  380.  
  381. *******************************************************************************
  382. *                                   Credits                                   *
  383. *******************************************************************************
  384.  
  385.   3dLIB was written using Turbo Pascal 6.0 & 7.0, as well as 
  386.   Turbo Pascal for Windows 1.0, 1.5 and Borland Pascal with objects 7.0.
  387.   These products are trademarks of Borland international.
  388.  
  389.   Windows 3.0 and Windows 3.1 are trademarks of Microsoft Corp.
  390.  
  391.   The Borland Brief v3.1 editor was used to write these programs.
  392.  
  393.   The windows help file was created using the help development kit v2.0
  394.   by Loewy Ron.
  395.  
  396.   The Author's picture (in the 3dCW program) was taken by Allison Bially.
  397.  
  398.  
  399.